//
//  Group+CoreDataProperties.m
//  RecordApp
//
//  Created by chaichai on 2022/3/2.
//
//

#import "Group+CoreDataProperties.h"

@implementation Group (CoreDataProperties)

+ (NSFetchRequest<Group *> *)fetchRequest {
	return [NSFetchRequest fetchRequestWithEntityName:@"Group"];
}

@dynamic count;
@dynamic first;
@dynamic last;
@dynamic records;
- (void)addRecordsObject:(Record *)value
{
    NSMutableSet *set = [NSMutableSet setWithSet:self.records];
    [set addObject:value];
    self.records = set;
}
- (void)removeRecordsObject:(Record *)value
{
    NSMutableSet *set = [NSMutableSet setWithSet:self.records];
    [set removeObject:value];
    self.records = set;
}
- (void)addRecords:(NSSet<Record *> *)values
{
    NSMutableSet *set = [NSMutableSet setWithSet:self.records];
    [set addObjectsFromArray:[values allObjects]];
    self.records = set;
}
- (void)removeRecords:(NSSet<Record *> *)values
{
    NSMutableSet *set = [NSMutableSet setWithSet:self.records];
    [values enumerateObjectsUsingBlock:^(Record * _Nonnull obj, BOOL * _Nonnull stop) {
        [set removeObject:obj];
    }];
    self.records = set;
}
@end
